#ifndef __CTRL_JOYSTICK_H
#define __CTRL_JOYSTICK_H

#include "cmsis_os2.h"
#include "ctrl_protocol.h"

typedef struct
{
    int16_t adc_joy_right_fb;       // 前后
    int16_t adc_joy_right_lr;       // 左右
    int16_t adc_joy_left_fb;
    int16_t adc_joy_left_lr;
} ADC_Joystick_Value_t;

ADC_Joystick_Value_t Joystick_Sample(void);
ADC_Joystick_Value_t Joystick_Raw_Sample(void);
void Joystick_Init(void);
int Joystick_Calibration(ADC_Joystick_Value_t err);

#endif